package android.funtionality;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class OnLineChecker {
	
	public OnLineChecker (){
		;
	}

	public boolean isOnline(Context currentContext) {
		ConnectivityManager cm = (ConnectivityManager) currentContext
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo netInfo = cm.getActiveNetworkInfo();
		if (netInfo != null && netInfo.isConnectedOrConnecting()) {
			return true;
		}
		return false;
	}

}
